/*
 * @Author: your name
 * @Date: 2021-06-21 10:05:36
 * @LastEditTime: 2021-08-24 16:04:30
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /shb-pc-fe/src/modules/task/taskTypes/allot/TaskAllotListData.ts
 */
/* components */
import TaskAllotListComponents from '@src/modules/task/taskTypes/allot/TaskAllotListComponents'
import PlanTaskEditForm from '@src/modules/task/taskTypes/allot/components/PlanTaskEditForm/PlanTaskEditForm.vue'
import BatchAllotDialog from '@src/modules/task/taskTypes/allot/components/BatchAllotDialog/BatchAllotDialog.vue'
import AllotMapDialog from '@src/modules/task/taskTypes/allot/components/AllotMapDialog/AllotMapDialog.tsx'
import TaskAllotModal from '@src/modules/task/components/TaskAllotModal/TaskAllotModal.tsx'
/* enum */
import StorageKeyEnum from '@model/enum/StorageKeyEnum'
/* model */
import { getTaskAllotInitDataResult } from '@model/param/out/Task'
import Column from '@model/types/Column'
/* vue */
import { Ref } from 'vue-property-decorator'

class TaskAllotListData extends TaskAllotListComponents {
  // 地图派单弹窗
  @Ref() AllotMapDialogComponent!: AllotMapDialog
  // 批量指派弹窗
  @Ref() BatchAllotDialogComponent!: BatchAllotDialog
  // 计划任务编辑表单
  @Ref() PlanTaskEditFormComponent!: PlanTaskEditForm
  // 指派弹窗
  @Ref() TaskAllotModalComponent!: TaskAllotModal
  
  /* 高级搜索字段缓存数据 */
  public advancedSearchFieldStorageKey: StorageKeyEnum = StorageKeyEnum.TaskAllotListSearchFields
  /* 列数据 */
  public columns: Column[] = this.getColumnFields(this) as Column[]
  /* 初始数据 */
  public initData: getTaskAllotInitDataResult = {
    taskTypeList: [],
    hasSub: false,
    restructAllot: true, // 指派工单全量开放了这里改成true
    showPlanTask: false,
  }
  public packUp = true
  /* 地图模式 */
  public mapShow: boolean = false
  /* 选择列 缓存键名 */
  public selectColumnStorageKey: StorageKeyEnum = StorageKeyEnum.TaskAllotListTableColumns
  /* pageSize 缓存键名 */
  public pageSizeStorageKey: StorageKeyEnum = StorageKeyEnum.TaskAllotPageSize
  public planForm: Record<string, any> = {}
  public currOperationTask: Record<string, any> = {}
  public currLoginUser: Record<string, any> = {}
}

export default TaskAllotListData
